1. Technical Field
This invention relates to automatically merging modified source code with annotations from a prior version of the source code. More specifically, the invention pertains to defining the parameters of a match between the annotations and the modified source code, and based upon the defined parameters selectively allowing an automated merge of the annotations with the source code.
2. Description of the Prior Art
Source code is a sequence of program instructions in their original form. Source code is primarily used as input to a process that produces an executable program. It is known in the art that a programmer often adds annotations to source code. In one embodiment, an annotation is a comment attached to a particular section of a document. Annotations doe not affect the functionality of the source code. Rather, the annotations provide supplementary information pertaining to the source code, such as explanations for other programmers, reminders, plans for improvement, etc. In one embodiment, annotations can be added to the source code by a compiler or programmer in the form of metadata. For example, a compiler may use an annotation to make decisions about warnings to issue, or a linker can use an annotation to connect multiple objects into a single executable. A linker is a program that takes one or more objects generated by compilers and assembles them into a single executable program.
Often, software developers need to be able to create and access information that is not going to be part of the source file itself. The benefit of employment of annotations is that they are usually part of several software development activities, where third party source code is analyzed in a functional way. Annotations can therefore help the developer during any stage of software development where a formal documentation system would hinder progress.
It is known in the art that source code is not static and is periodically subject to change. Furthermore, it is known in the art that a prior form of the metadata and the modified source code may not be aligned when changes to the source code occurs. This misalignment is a waste of the annotations in the source code. Although annotations can be moved and/or copied to identify different locations of the source code to which it pertains, a manually alignment of annotated source code with annotations is inefficient. There are situations when source code is updated or enhanced often. A manual alignment would be time consuming for a frequently modified source code. Accordingly, there is a need for an automated alignment of annotations with modified source code.